package com.shop.service.impl;


import com.baomidou.mybatisplus.core.conditions.Wrapper;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.shop.mapper.CarouselMapper;
import com.shop.pojo.Carousel;
import com.shop.service.CarouselService;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * <p>
 * 轮播图  服务实现类
 * </p>
 *
 * @author Administrator
 * @since 2020-10-31
 */
@Service
public class CarouselServiceImpl extends ServiceImpl<CarouselMapper, Carousel> implements CarouselService {

    @Override
    public List<Carousel> queryAll(Integer isShow) {
        QueryWrapper<Carousel> query = new QueryWrapper<>();
        query.eq(Carousel.IS_SHOW,isShow);
        query.orderByAsc(Carousel.SORT);
        return this.list(query);
    }
}
